Optimal. Leaf size=42 \[ -2 a b x+\frac {2 b^2 \cos (c+d x)}{d}+\frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2940, 12, 2718}
\begin {gather*} \frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d}-2 a b x+\frac {2 b^2 \cos (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2718
Rule 2940
Rubi steps
\begin {align*} \int \sec (c+d x) (a+b \sin (c+d x))^2 \tan (c+d x) \, dx &=\frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d}-\int 2 b (a+b \sin (c+d x)) \, dx\\ &=\frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d}-(2 b) \int (a+b \sin (c+d x)) \, dx\\ &=-2 a b x+\frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d}-\left (2 b^2\right ) \int \sin (c+d x) \, dx\\ &=-2 a b x+\frac {2 b^2 \cos (c+d x)}{d}+\frac {\sec (c+d x) (a+b \sin (c+d x))^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 66, normalized size = 1.57 \begin {gather*} \frac {\left (2 a^2+3 b^2+b^2 \cos (2 (c+d x))\right ) \sec (c+d x)-2 \left (a^2+b^2+2 a b (c+d x)-2 a b \tan (c+d x)\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.17, size = 75, normalized size = 1.79
method | result | size |
derivativedivides | \(\frac {\frac {a^{2}}{\cos \left (d x +c \right )}+2 a b \left (\tan \left (d x +c \right )-d x -c \right )+b^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) | \(75\) |
default | \(\frac {\frac {a^{2}}{\cos \left (d x +c \right )}+2 a b \left (\tan \left (d x +c \right )-d x -c \right )+b^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) | \(75\) |
risch | \(-2 a b x +\frac {{\mathrm e}^{i \left (d x +c \right )} b^{2}}{2 d}+\frac {{\mathrm e}^{-i \left (d x +c \right )} b^{2}}{2 d}+\frac {4 i a b +2 a^{2} {\mathrm e}^{i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) | \(91\) |
norman | \(\frac {\frac {2 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a^{2}+4 b^{2}}{d}+2 a b x -\frac {\left (6 a^{2}+4 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {8 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+2 a b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 a b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 a b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(200\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 56, normalized size = 1.33 \begin {gather*} -\frac {2 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a b - b^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - \frac {a^{2}}{\cos \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 59, normalized size = 1.40 \begin {gather*} -\frac {2 \, a b d x \cos \left (d x + c\right ) - b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}{d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 82, normalized size = 1.95 \begin {gather*} -\frac {2 \, {\left ({\left (d x + c\right )} a b + \frac {2 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2} + 2 \, b^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.25, size = 81, normalized size = 1.93 \begin {gather*} -\frac {2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+4\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+4\,b^2}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-1\right )}-2\,a\,b\,x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________